
// <script>
//     // 选项式
//     export default {
//         mounted(){
//             console.log(this.$route)   // 当前路由信息
//             console.log(this.$router)  // 当前路由配置
//         }
//     }
// </script>  

<script setup>
    // 组合式获取当前路由信息和路由配置
    import { useRouter, useRoute } from 'vue-router'

    // 组件内路由守卫钩子函数  (绑定钩子函数的)
    // import { onBeforeRouteEnter, onBeforeRouteUpdate,onBeforeRouteLeave } from 'vue-router' 

    let route = useRoute();
    let router = useRouter()

    console.log(route);
    console.log(route.path);
    console.log(route.name);
    console.log(route.query);
    console.log(route.params);


    console.log(router);

</script>


<template>
    <div class="about">
        <h1>404</h1>
    </div>
</template>
  
<style></style>
  